<ion-modal-view ng-controller="NewChatCtrl">
  <ion-header-bar class="bar-royal">
    <div class="buttons">
      <button class="button button-icon icon ion-ios-arrow-back" ng-click="hideModal()"></button>
    </div>
    <h1 class="title">发起群聊</h1>
    <div class="buttons">
      <button class="button button-clear button-light" ng-click="creatNewChat()">完成</button>
    </div>
  </ion-header-bar>

  <section class="bar bar-subheader row">
    <div class="selected-users">
      <i class="icon icon-label ion-ios-search dark2" ng-if="!selectedUsers.length"></i>
      <div>{{selectedUsers}}</div>
    </div>
    <div class="col item-input" text-filter>
		    <div ng-click="toggleFilter()">搜索</div>
	  </div>
  </section>

  <ion-content>
    <div class="list">
      <ion-checkbox class="item checkbox-royal" ng-repeat="user in users | filter:filter" ng-checked="selectedUsers.indexOf(user) > -1" ng-click="select(user);">
        <div class="row row-nopadding">
          <div class="">{{user.avatar}}</div>
          <h2 class="col">{{user.profile.name}}<span class="item-note">{{user.profile.roleName}}</span></h2>
        </div>
      </ion-checkbox>

    </div>
  </ion-content>
</ion-modal-view>
